<?php

class Admin_FeedbackController extends Zend_Controller_Action
{
	public function indexAction()
	{
		$task = $this->_helper->getHelper("TaskList");

		$service = new FeedbackService();
		$task->setService($service);
		
		$task->registerTask("search","title");
		
		$data = $task->doTask();

		$gui = $this->_helper->getHelper("Gui");
		$gui->setToolbar(array('delete'),My_Translate::translate("FEEDBACK_MANAGER"));
		$gui->showData($data);
	}

	public function viewAction()
	{
		$service = new FeedbackService();

		$id = $this->_getParam("id");
		if(!empty($id))
		{
			$this->view->feedback = $service->loadData($id);
		}
		
		$gui = $this->_helper->getHelper("Gui");
		$gui->setToolbar(null,My_Translate::translate("FEEDBACK"));
	}

}